package com.beijiteshop.shop.ui.address.adapter

import com.beijiteshop.shop.R
import com.beijiteshop.shop.databinding.ItemAddressBinding
import com.beijiteshop.shop.model.api.response.AddressBean
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder

/**
 * @Author LiaoZhongKai
 * @Date 2021/3/8 19:17
 * @Description 地址列表适配器
 */
class AddressAdapter(data: MutableList<AddressBean>) : BaseQuickAdapter<AddressBean,BaseDataBindingHolder<ItemAddressBinding>>(
    R.layout.item_address,data) {

    init {
        addChildClickViewIds(R.id.address_edit_iv)
    }

    override fun convert(holder: BaseDataBindingHolder<ItemAddressBinding>, item: AddressBean) {
        holder.dataBinding?.let {
            it.address = item
        }
    }
}